/*
 * @Author: xiaosihan 
 * @Date: 2024-01-20 06:43:01 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-01-20 22:19:34
 */


import { autorun } from "mobx";
import { ReactNode, useEffect, useRef, useState } from "react";
import styles from "./head.module.less";
import bg1PNG from "./bg1.png";
import homeStore from "@views/home/homeStore";

interface Iprops {
    children?: ReactNode
}

// 头部
export default function Head() {

    const dom = useRef<HTMLDivElement | null>(null);
    const [data, setData] = useState({});
    const [MdTitle, setMdTitle] = useState(homeStore.MdTitle);

    useEffect(() => {

    }, []);

    useEffect(() => autorun(() => {
        setMdTitle(homeStore.MdTitle);
    }, { delay: 10 }), []);

    return (
        <div className={styles.head} >

            <div className={styles.box1} >
                <div className={styles.box2} >
                    <div className={styles.title} >
                        {MdTitle}
                    </div>
                </div>
            </div>

            <img className={styles.decoration1} src={bg1PNG} alt="" />
            <img className={styles.decoration2} src={bg1PNG} alt="" />

        </div>
    );

}